﻿@model CodeCamp.Models.EventMgmt.EventEditViewModel

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
@*<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>*@

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

        @Html.HiddenFor(model => model.Id)
    <table>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.ShortName):
        </td>
        @if (Model.Id == 0)
        {
        <td class="editor-field">
            @Html.EditorFor(model => model.ShortName):
            @Html.ValidationMessageFor(model => model.ShortName)
        </td>
        }
        else
        {
        <td class="display-field">
            @Html.DisplayTextFor(model => model.ShortName)
            @Html.HiddenFor(model => model.ShortName)
        </td>
        }
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.EventStartDate):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.EventStartDate)
            @Html.ValidationMessageFor(model => model.EventStartDate)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.DisplaySortOrder):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.DisplaySortOrder)
            @Html.ValidationMessageFor(model => model.DisplaySortOrder)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.DisplayName):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.DisplayName, new { @class = "displayName" })
            @Html.ValidationMessageFor(model => model.DisplayName)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.DisplayDate):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.DisplayDate)
            @Html.ValidationMessageFor(model => model.DisplayDate)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.DisplayLocation):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.DisplayLocation)
            @Html.ValidationMessageFor(model => model.DisplayLocation)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.EventIsPublic):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.EventIsPublic)
            @Html.ValidationMessageFor(model => model.EventIsPublic)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.AgendaIsPublic, "Agenda is Public"):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.AgendaIsPublic)
            @Html.ValidationMessageFor(model => model.AgendaIsPublic)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.ScheduleIsPublic, "Schedule is Public"):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.ScheduleIsPublic)
            @Html.ValidationMessageFor(model => model.ScheduleIsPublic)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.ScheduleVisibleToPresenters, "Schedule visible to Presenters"):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.ScheduleVisibleToPresenters)
            @Html.ValidationMessageFor(model => model.ScheduleVisibleToPresenters)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.RegistrationUrl):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.RegistrationUrl)
            @Html.ValidationMessageFor(model => model.RegistrationUrl)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.SchedulePdfUrl):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.SchedulePdfUrl)
            @Html.ValidationMessageFor(model => model.SchedulePdfUrl)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.SessionSubmissionsOpen):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.SessionSubmissionsOpen)
            @Html.ValidationMessageFor(model => model.SessionSubmissionsOpen)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.SessionSubmissionsClose):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.SessionSubmissionsClose)
            @Html.ValidationMessageFor(model => model.SessionSubmissionsClose)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.PriorEventProfileReuseAllowed, "Prior event profile reuse allowed"):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.PriorEventProfileReuseAllowed)
            @Html.ValidationMessageFor(model => model.PriorEventProfileReuseAllowed)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.DisconnectedPresenterProfileConnectionAllowed, "Disconnected presenter profile connection allowed"):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.DisconnectedPresenterProfileConnectionAllowed)
            @Html.ValidationMessageFor(model => model.DisconnectedPresenterProfileConnectionAllowed)
        </td>
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.NonPublicEventPreviewRole, "Non-public event preview role"):
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.NonPublicEventPreviewRole)
            @Html.ValidationMessageFor(model => model.NonPublicEventPreviewRole)
        </td>
        </tr>

        <tr>
        <td colspan="2">
            <input type="submit" value="Save" />
        </td>
        </tr>

        <tr>
    </table>
}
